package edu.uclmgmu.bacteriosec.aspects.sos;

import java.io.SocketOutputStream;

import edu.uclmgmu.bacteriosec.aspects.common.Store;

privileged aspect SOS_CountCalls {
	void around(java.net.SocketOutputStream f, byte[] b, int off, int len) : target(f) && args(b, off, len) &&  call(* SocketOutputStream.writeBytes(byte[], int, int)) {
		int counter=Store.get(thisJoinPointStaticPart.getSignature());
		Store.updateNumberOfCalls(thisJoinPointStaticPart.getSignature(), counter++);
		Store.put(thisJoinPointStaticPart.getSignature(), counter);
		proceed(f, b, off, len);
	}
}
